import { defHttp } from "@/utils/http";

// ERP 药品 - 物资分类 API
export const whmGoodsTypeApi = {
	// 获得药品 - 物资分类分页
	whmGoodsTypeList: async (params: any) => {
		return await defHttp.get({ url: `/whs/whm-goods-type/page`, params });
	},
	// 新增药品 - 物资分类
	whmGoodsTypeCreate: async (data: any) => {
		return await defHttp.post({ url: `/whs/whm-goods-type/create`, data });
	},

	// 修改药品 - 物资分类
	whmGoodsTypeUpdate: async (data: any) => {
		return await defHttp.put({ url: `/whs/whm-goods-type/update`, data });
	},

	// 删除药品 - 物资分类
	whmGoodsTypeDelete: async (id: number) => {
		return await defHttp.delete({ url: `/whs/whm-goods-type/delete?id=` + id });
	}
};
